﻿////////////////////////////////////////////////////////////////////////
//Autor: Gabriel Tame Borao  - gabrieltame@yahoo.es 
//Fecha: 2010/09/15 01:26
//Solucion: GTameReport.sln
//Proyecto: GTameReport
//Fichero: AxisType.cs
//
//	Copyright (C) 2010  Gabriel Tame Borao (GTB)
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
namespace GTameReport
{
    using Rdl;
    using System;
    using System.Collections;

    public class AxisType
    {
        private string _CrossAt;
        private bool? _Interlaced = null;
        private bool? _LogScale = null;
        private GTameReport.MajorGridLinesType _MajorGridLines;
        private string _MajorInterval;
        private AxisTypeMajorTickMarks _MajorTickMarks;
        private bool? _Margin = null;
        private string _Max;
        private string _Min;
        private GTameReport.MinorGridLinesType _MinorGridLines;
        private string _MinorInterval;
        private AxisTypeMinorTickMarks _MinorTickMarks;
        private bool? _Reverse = null;
        private bool? _Scalar = null;
        private GTameReport.StyleType _Style;
        private GTameReport.TitleType _Title;
        private bool? _Visible = null;

        public Rdl.AxisType Write()
        {
            Rdl.AxisType type = new Rdl.AxisType();
            ArrayList list = new ArrayList();
            ArrayList list2 = new ArrayList();
            if (this._CrossAt != null)
            {
                list.Add(this._CrossAt);
                list2.Add(ItemsChoiceType25.CrossAt);
            }
            if (this._Interlaced.HasValue)
            {
                list.Add(this._Interlaced);
                list2.Add(ItemsChoiceType25.Interlaced);
            }
            if (this._LogScale.HasValue)
            {
                list.Add(this._LogScale);
                list2.Add(ItemsChoiceType25.LogScale);
            }
            if (this._MajorGridLines != null)
            {
                list.Add(this._MajorGridLines.Write());
                list2.Add(ItemsChoiceType25.MajorGridLines);
            }
            if (this._MajorInterval != null)
            {
                list.Add(this._MajorInterval);
                list2.Add(ItemsChoiceType25.MajorInterval);
            }
            list.Add(this._MajorTickMarks);
            list2.Add(ItemsChoiceType25.MajorTickMarks);
            if (this._Margin.HasValue)
            {
                list.Add(this._Margin);
                list2.Add(ItemsChoiceType25.Margin);
            }
            if (this._Max != null)
            {
                list.Add(this._Max);
                list2.Add(ItemsChoiceType25.Max);
            }
            if (this._Min != null)
            {
                list.Add(this._Min);
                list2.Add(ItemsChoiceType25.Min);
            }
            if (this._MinorGridLines != null)
            {
                list.Add(this._MinorGridLines.Write());
                list2.Add(ItemsChoiceType25.MinorGridLines);
            }
            if (this._MinorInterval != null)
            {
                list.Add(this._MinorInterval);
                list2.Add(ItemsChoiceType25.MinorInterval);
            }
            list.Add(this._MinorTickMarks);
            list2.Add(ItemsChoiceType25.MinorTickMarks);
            if (this._Reverse.HasValue)
            {
                list.Add(this._Reverse);
                list2.Add(ItemsChoiceType25.Reverse);
            }
            if (this._Scalar.HasValue)
            {
                list.Add(this._Scalar);
                list2.Add(ItemsChoiceType25.Scalar);
            }
            if (this._Style != null)
            {
                list.Add(this._Style.Write());
                list2.Add(ItemsChoiceType25.Style);
            }
            if (this._Title != null)
            {
                list.Add(this._Title.Write());
                list2.Add(ItemsChoiceType25.Title);
            }
            if (this._Visible.HasValue)
            {
                list.Add(this._Visible);
                list2.Add(ItemsChoiceType25.Visible);
            }
            type.Items = list.ToArray();
            type.ItemsElementName = (ItemsChoiceType25[]) list2.ToArray(typeof(ItemsChoiceType25));
            list2 = null;
            list = null;
            return type;
        }

        public string CrossAt
        {
            get
            {
                return this._CrossAt;
            }
            set
            {
                this._CrossAt = value;
            }
        }

        public bool? Interlaced
        {
            get
            {
                return this._Interlaced;
            }
            set
            {
                this._Interlaced = value;
            }
        }

        public bool? LogScale
        {
            get
            {
                return this._LogScale;
            }
            set
            {
                this._LogScale = value;
            }
        }

        public GTameReport.MajorGridLinesType MajorGridLines
        {
            get
            {
                if (this._MajorGridLines == null)
                {
                    this._MajorGridLines = new GTameReport.MajorGridLinesType();
                }
                return this._MajorGridLines;
            }
            set
            {
                this._MajorGridLines = value;
            }
        }

        public string MajorInterval
        {
            get
            {
                return this._MajorInterval;
            }
            set
            {
                this._MajorInterval = value;
            }
        }

        public AxisTypeMajorTickMarks MajorTickMarks
        {
            get
            {
                return this._MajorTickMarks;
            }
            set
            {
                this._MajorTickMarks = value;
            }
        }

        public bool? Margin
        {
            get
            {
                return this._Margin;
            }
            set
            {
                this._Margin = value;
            }
        }

        public string Max
        {
            get
            {
                return this._Max;
            }
            set
            {
                this._Max = value;
            }
        }

        public string Min
        {
            get
            {
                return this._Min;
            }
            set
            {
                this._Min = value;
            }
        }

        public GTameReport.MinorGridLinesType MinorGridLines
        {
            get
            {
                if (this._MinorGridLines == null)
                {
                    this._MinorGridLines = new GTameReport.MinorGridLinesType();
                }
                return this._MinorGridLines;
            }
            set
            {
                this._MinorGridLines = value;
            }
        }

        public string MinorInterval
        {
            get
            {
                return this._MinorInterval;
            }
            set
            {
                this._MinorInterval = value;
            }
        }

        public AxisTypeMinorTickMarks MinorTickMarks
        {
            get
            {
                return this._MinorTickMarks;
            }
            set
            {
                this._MinorTickMarks = value;
            }
        }

        public bool? Reverse
        {
            get
            {
                return this._Reverse;
            }
            set
            {
                this._Reverse = value;
            }
        }

        public bool? Scalar
        {
            get
            {
                return this._Scalar;
            }
            set
            {
                this._Scalar = value;
            }
        }

        public GTameReport.StyleType Style
        {
            get
            {
                if (this._Style == null)
                {
                    this._Style = new GTameReport.StyleType();
                }
                return this._Style;
            }
            set
            {
                this._Style = value;
            }
        }

        public GTameReport.TitleType Title
        {
            get
            {
                if (this._Title == null)
                {
                    this._Title = new GTameReport.TitleType();
                }
                return this._Title;
            }
            set
            {
                this._Title = value;
            }
        }

        public bool? Visible
        {
            get
            {
                return this._Visible;
            }
            set
            {
                this._Visible = value;
            }
        }
    }
}

